<template>
  <div>
    <button @click="chanageStyle">显示/隐藏</button>
    <!-- appera属性时一上来就播放一次动画 -->
    <transition
      appear
      name="animate__animated animate__bounce"
      enter-active-class="animate__rotateIn"
      leave-active-class="animate__rotateOut"
    >
      <h1 v-show="isShow">你好啊!</h1>
    </transition>
  </div>
</template>

<script>
import 'animate.css';
export default {
  name: 'Test',
  data() {
    return {
      isShow: true,
    };
  },
  methods: {
    chanageStyle() {
      this.isShow = !this.isShow;
    },
  },
};
</script>
// 使用animate.css 第三方动画库
<style scoped>
h1 {
  background-color: orange;
}
</style>
